$(document).ready(function(){
	$('#wrapper').append("<a class='top hidden' href='#' title='返回顶部' hideFocus='true'>Top</a>");
	$.waypoints.settings.scrollThrottle = 30;
	$('#wrapper').waypoint(function(event, direction) {
		$('.top').toggleClass('hidden', direction === "up");
	}, {
		offset: '-10'
	});
	//$('.top').addClass('hidden');
	$('.top').click(function() {
	  $('body,html').animate({scrollTop:0},'slow');
	  return false;
	});
});